package de.infotheo;

import java.math.BigInteger;

public class InfoTheoMain {

	public static void main(String[] args) {

		System.out.println("\n\n1 a)\n=====================================");
		// create object to determine the group order
		OrderOfGroup groupOrder = new OrderOfGroup();

		// call method of object to calculate the order of the group Z^*_(300564)
		groupOrder.calcOrderOfGroup(new BigInteger("300564"));

		System.out.println("\n\n1 b)\n=====================================");
		
		System.out.println("ggt(1155,1768) = "+new BigInteger("1155").gcd(new BigInteger("1768")) + ", if 1 then in group");
		// create object to determine the order of group element
		OrderOfGroupMember member1b = new OrderOfGroupMember();
		// call method of object to calculate the order of 1155 in Z^*_(1768)
		member1b.calcOrderOfGroupMember(new BigInteger("1155"), new BigInteger(
				"1768"));
		// print the inverse of 1155 in Z^*_(1768)
		System.out.println("The inverse of 1155 in Z_1768 is: "
				+ new BigInteger("1155").modInverse(new BigInteger("1768"))
						.toString());

		System.out.println("\n\n1 c)\n=====================================");

		System.out.println("\n\n2)\n=====================================");

		System.out.println("\n\n3)\n=====================================");

		

		System.out.println("\n\n4)\n=====================================\n");

		ElGamal elg = new ElGamal();
		elg.decY(new BigInteger("24"), new BigInteger("37"),
				new BigInteger("2"), new BigInteger("30"), new BigInteger("53"));

		System.out.println("\n\n5)\n=====================================\n");
		

		
		
		BabyStepGiantStep step = new BabyStepGiantStep();
		step.calcDiscLog(new BigInteger("3"), new BigInteger("1823") ,
				new BigInteger("693"));
		
	

		System.out.println("\n\n6)\n=====================================\n");

		
		BabyStepGiantStep step2 = new BabyStepGiantStep();
		step2.calcDiscLog(new BigInteger("10"), new BigInteger("109") ,
				new BigInteger("98"));
		

	}

}
